From 9b185ed750e60cf19f12e88936c70ac8594ef531 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 31 Dec 2001 22:17:26 +0000 Subject: [PATCH] fix an incorrect assertion that the "valid" flag is always correct in a 2001-12-31 Havoc Pennington * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): fix an incorrect assertion that the "valid" flag is always correct in a node and add explanatory comment. This keeps me from reproducing #59101, but I'm remembering that 59101 was actually about incorrect pixel totals, so I'm not sure 59101 is actually fixed. May just have stopped happening due to some change in how C-k works. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtktextbtree.c | 13 ++++++++++++- 8 files changed, 82 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 04e2b898c6..129389c62e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 04e2b898c6..129389c62e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2001-12-31 Havoc Pennington + + * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency): + fix an incorrect assertion that the "valid" flag is always correct + in a node and add explanatory comment. This keeps me from + reproducing #59101, but I'm remembering that 59101 was actually + about incorrect pixel totals, so I'm not sure 59101 is actually + fixed. May just have stopped happening due to some change in + how C-k works. + 2001-12-31 Havoc Pennington * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 87713ff40b..3cabfc7272 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -6431,9 +6431,20 @@ gtk_text_btree_node_view_check_consistency (GtkTextBTree *tree, gtk_text_btree_node_compute_view_aggregates (node, nd->view_id, &width, &height, &valid); + + /* valid aggregate not checked the same as width/height, because on + * btree rebalance we can have invalid nodes where all lines below + * them are actually valid, due to moving lines around between + * nodes. + * + * The guarantee is that if there are invalid lines the node is + * invalid - we don't guarantee that if the node is invalid there + * are invalid lines. + */ + if (nd->width != width || nd->height != height || - !nd->valid != !valid) + (nd->valid && !valid)) { g_error ("Node aggregates for view %p are invalid:\n" "Are (%d,%d,%s), should be (%d,%d,%s)", -- 2.30.2